import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {GnRouteGuard} from 'geminis-ng-core';

const routes: Routes = [
  {
    path: 'oidc',
    loadChildren: () => import('./oidc/oidc.module').then(m => m.OidcModule),
  },
  {
    path: 'workspace',
    loadChildren: () => import('./workspace/workspace.module').then(m => m.WorkspaceModule),
    canActivate: [GnRouteGuard]
  },
  {
    path: 'me',
    loadChildren: () => import('./me/me.module').then(m => m.MeModule),
    canActivate: [GnRouteGuard]
  }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule {
}
